
<%@ page import="org.ikastola.Student" %>
<!DOCTYPE html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'student.label', default: 'Student')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-student" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
<%--			<li><g:link class="list" action="balances" id="${studentInstance?.id}"><g:message code="a" default="Historico Balances" /></g:link></li> --%>
			</ul>
		</div>
		<div id="show-student" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list student">
			
				<g:if test="${studentInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="student.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${studentInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.lastname}">
				<li class="fieldcontain">
					<span id="lastname-label" class="property-label"><g:message code="student.lastname.label" default="Lastname" /></span>
					
						<span class="property-value" aria-labelledby="lastname-label"><g:fieldValue bean="${studentInstance}" field="lastname"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.docnumber}">
				<li class="fieldcontain">
					<span id="docnumber-label" class="property-label"><g:message code="student.docnumber.label" default="Docnumber" /></span>
					
						<span class="property-value" aria-labelledby="docnumber-label"><g:fieldValue bean="${studentInstance}" field="docnumber"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.doctype}">
				<li class="fieldcontain">
					<span id="doctype-label" class="property-label"><g:message code="student.doctype.label" default="Doctype" /></span>
					
						<span class="property-value" aria-labelledby="doctype-label">
						<g:if test="${studentInstance?.doctype == '1'}">
							<g:message code="student.doctype.1"/>
						</g:if>
						<g:if test="${studentInstance?.doctype == '2'}">
							<g:message code="student.doctype.2"/>
						</g:if>
						<g:if test="${studentInstance?.doctype == '3'}">
							<g:message code="student.doctype.3"/>
						</g:if>
						</span>
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.birthdate}">
				<li class="fieldcontain">
					<span id="birthdate-label" class="property-label"><g:message code="student.birthdate.label" default="Birthdate" /></span>
					
						<span class="property-value" aria-labelledby="birthdate-label"><g:formatDate date="${studentInstance?.birthdate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.status}">
				<li class="fieldcontain">
					<span id="condition-label" class="property-label"><g:message code="student.status.label" default="Status" /></span>
					
						<span class="property-value" aria-labelledby="status-label">
						<g:if test="${studentInstance?.status == '1'}">
							<g:message code="student.status.1"/>
						</g:if>
						<g:if test="${studentInstance?.status == '2'}">
							<g:message code="student.status.2"/>
						</g:if>
						<g:if test="${studentInstance?.status == '3'}">
							<g:message code="student.status.3"/>
						</g:if>
					</span>
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.address}">
				<li class="fieldcontain">
					<span id="address-label" class="property-label"><g:message code="student.address.label" default="Address" /></span>
					
						<span class="property-value" aria-labelledby="address-label"><g:fieldValue bean="${studentInstance}" field="address"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.nationality}">
				<li class="fieldcontain">
					<span id="nationality-label" class="property-label"><g:message code="student.nationality.label" default="Nationality" /></span>
					
						<span class="property-value" aria-labelledby="nationality-label"><g:fieldValue bean="${studentInstance}" field="nationality"/></span>
					
				</li>
				</g:if>
				
				<g:if test="${studentInstance?.phonenumber}">
				<li class="fieldcontain">
					<span id="phonenumber-label" class="property-label"><g:message code="student.phonenumber.label" default="Telefono" /></span>
					
						<span class="property-value" aria-labelledby="phonenumber-label"><g:fieldValue bean="${studentInstance}" field="phonenumber"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.course}">
				<li class="fieldcontain">
					<span id="course-label" class="property-label"><g:message code="student.course.label" default="Course" /></span>
					
						<span class="property-value" aria-labelledby="course-label">
						<g:link controller="course" action="show" id="${studentInstance?.course?.id}">${studentInstance?.course?.name?.encodeAsHTML()} ${studentInstance?.course?.division?.encodeAsHTML()}</g:link>
						</span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.active}">
				<li class="fieldcontain">
					<span id="active-label" class="property-label"><g:message code="student.active.label" default="Active" /></span>
					
						<span class="property-value" aria-labelledby="active-label">
						<g:if test="${studentInstance?.active == '1'}">
							<g:message code="student.active.1"/>
						</g:if>
						<g:if test="${studentInstance?.active == '2'}">
							<g:message code="student.active.2"/>
						</g:if>
						</span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.service}">
				<li class="fieldcontain">
					<span id="service-label" class="property-label"><g:message code="student.service.label" default="Service" /></span>
					
						<span class="property-value" aria-labelledby="service-label">
						<g:each in="${studentInstance?.service?.fees}">
							<g:link controller="fee" action="show" id="${it.id}">${it.name.encodeAsHTML()}</g:link>
						</g:each>
						<g:each in="${studentInstance?.service?.discounts}">
							<g:link controller="discount" action="show" id="${it.id}">${it.name.encodeAsHTML()}</g:link>
						</g:each>
						</span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.admdate}">
				<li class="fieldcontain">
					<span id="admdate-label" class="property-label"><g:message code="student.admdate.label" default="Admdate" /></span>
					
						<span class="property-value" aria-labelledby="admdate-label"><g:formatDate date="${studentInstance?.admdate}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.birthplace}">
				<li class="fieldcontain">
					<span id="birthplace-label" class="property-label"><g:message code="student.birthplace.label" default="Birthplace" /></span>
					
						<span class="property-value" aria-labelledby="birthplace-label"><g:fieldValue bean="${studentInstance}" field="birthplace"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.city}">
				<li class="fieldcontain">
					<span id="city-label" class="property-label"><g:message code="student.city.label" default="City" /></span>
					
						<span class="property-value" aria-labelledby="city-label"><g:fieldValue bean="${studentInstance}" field="city"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.email}">
				<li class="fieldcontain">
					<span id="email-label" class="property-label"><g:message code="student.email.label" default="Email" /></span>
					
						<span class="property-value" aria-labelledby="email-label"><g:fieldValue bean="${studentInstance}" field="email"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.guardians}">
				<li class="fieldcontain">
					<span id="guardians-label" class="property-label"><g:message code="student.guardians.label" default="Guardians" /></span>
					
						<g:each in="${studentInstance.guardians}" var="g">
						<span class="property-value" aria-labelledby="guardians-label">
							<g:link controller="guardian" action="show" id="${g.id}">${g?.name?.encodeAsHTML()} ${g?.lastname?.encodeAsHTML()}</g:link>
						</span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.relatives}">
				<li class="fieldcontain">
					<span id="relatives-label" class="property-label"><g:message code="student.relatives.label" default="Relatives" /></span>
					
						<g:each in="${studentInstance.relatives}" var="r">
						<span class="property-value" aria-labelledby="relatives-label"><g:link controller="student" action="show" id="${r.id}">${r?.name?.encodeAsHTML()} ${r?.lastname?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${studentInstance?.zipcode}">
				<li class="fieldcontain">
					<span id="zipcode-label" class="property-label"><g:message code="student.zipcode.label" default="Zipcode" /></span>
					
						<span class="property-value" aria-labelledby="zipcode-label"><g:fieldValue bean="${studentInstance}" field="zipcode"/></span>
					
				</li>
				</g:if>
			
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${studentInstance?.id}" />
					<g:link class="edit" action="edit" id="${studentInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
